package cn.ewan.cloud.tenant.data.router.core.common.exception;

import cn.ewan.cloud.common.web.support.ResCodeMsg;

/**
 * 消息响应码
 *
 * @author dengts
 * @date 2021/11/26
 */
public enum TenantMsgCode implements ResCodeMsg {

    /**
     * 服务器异常
     */
    CONFIG_EXCEPTION(1001, "tenant config error"),
    TENANT_USER_EMPTY(1002, "tenant user empty"),
    TENANT_USER_CONFIG_EMPTY(1004, "tenant user config error"),
    TENANT_FLAG_NO_EXIST(1004, "tenant not find");


    /**
     * 返回码
     */
    private final int code;

    /**
     * 提示语
     */
    private final String msg;


    TenantMsgCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int code() {
        return this.code;
    }

    public String msg() {
        return this.msg;
    }


    @Override
    public int getCode() {
        return code();
    }

    @Override
    public String getMsg() {
        return msg();
    }
}
